/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2025. All rights reserved.
 * You can use this software according to the terms and conditions of the Mulan PSL v2.
 * You may obtain a copy of Mulan PSL v2 at:
 *          http://license.coscl.org.cn/MulanPSL2
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PSL v2 for more details.
 */

#ifndef OMNISTREAM_OMNIASYNCDATAOUTPUTTOOUTPUT_H
#define OMNISTREAM_OMNIASYNCDATAOUTPUTTOOUTPUT_H

#include "streaming/runtime/io/OmniPushingAsyncDataInput.h"
#include "streaming/api/operators/Output.h"
#include "streaming/runtime/metrics/WatermarkGauge.h"
#include "streaming/runtime/metrics/MetricGroup.h"

namespace omnistream {
    class OmniAsyncDataOutputToOutput : public omnistream::OmniPushingAsyncDataInput::OmniDataOutput {
    public:
        explicit OmniAsyncDataOutputToOutput(Output *output, bool isDataStream = false);
        void emitRecord(StreamRecord *streamRecord) override;
        void emitWatermark(Watermark *watermark) override;
        void emitWatermarkStatus(WatermarkStatus *watermarkStatus) override;

        ~OmniAsyncDataOutputToOutput() override = default;

    private:
        Output *output;
        bool isDataStream;
    };
};

#endif // OMNISTREAM_ASYNCDATAOUTPUTTOOUTPUT_H
